﻿//----------------------------------------------------------------
// Desc: 
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2013-05-26
//
// Update Date : 
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


// 必须实现的Fuel4D入口函数
extern IFApplication* FNewApplication(FEngineParameter& p);


//----------------------------------------------------------------
// 由app使用的一组函数
//----------------------------------------------------------------
// 由FuelApp重写Windows的入口函数
extern INT FCALL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, ACHAR* lpCmdLine, int nShowCmd);
extern INT FCALL wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, WCHAR* lpCmdLine, int nShowCmd);
// 各操作系统进入main后，立即调用此接口
extern int FAppRoot(FEngineParameter& ep);
// 转换指定路径到各平台资源路径（线程安全的）
extern const WCHAR* FAppGetAssetsW(const WCHAR* path);
extern const ACHAR* FAppGetAssetsA(const ACHAR* path);
// 获取各平台转换资源路径信息
extern const WCHAR* FAppSetAssetsRootW(const WCHAR* path);
extern const ACHAR* FAppSetAssetsRootA(const ACHAR* path);
extern const WCHAR* FAppGetAssetsRootW();
extern const ACHAR* FAppGetAssetsRootA();
// 转换指定路径到各平台临时/缓存路径（线程安全的）
extern const WCHAR* FAppGetTempW(const WCHAR* path);
extern const ACHAR* FAppGetTempA(const ACHAR* path);
// 获取各平台转换临时/缓存路径信息
extern const WCHAR* FAppSetTempRootW(const WCHAR* path);
extern const ACHAR* FAppSetTempRootA(const ACHAR* path);
extern const WCHAR* FAppGetTempRootW();
extern const ACHAR* FAppGetTempRootA();
// 取得WINDOWS的启动命令行
extern const WCHAR* FAppGetCommandW();
extern const ACHAR* FAppGetCommandA();

#if FUEL_OS_ANDROID
// 取得APK路径
extern const ACHAR* FAppGetApkPath();
// 取得APK相关联的内部存储器FILES/CACHE路径
extern const ACHAR* FAppGetApkFiles();
extern const ACHAR* FAppGetApkCache();
#endif


#ifdef UNICODE
#define FAppGetAssets           FAppGetAssetsW
#define FAppSetAssetsRoot       FAppSetAssetsRootW
#define FAppGetAssetsRoot       FAppGetAssetsPathW
#define FAppGetTemp             FAppGetTempW
#define FAppSetTempRoot         FAppSetTempRootW
#define FAppGetTempRoot         FAppGetTempRootW
#define FAppGetCommand          FAppGetCommandW
#else
#define FAppGetAssets           FAppGetAssetsA
#define FAppSetAssetsRoot       FAppSetAssetsRootA
#define FAppGetAssetsRoot       FAppGetAssetsRootA
#define FAppGetTemp             FAppGetTempA
#define FAppSetTempRoot         FAppSetTempRootA
#define FAppGetTempRoot         FAppGetTempRootA
#define FAppGetCommand          FAppGetCommandA
#endif

#if FUEL_OS_WINDOWS
#define FFAppGetAssets          FAppGetAssetsW
#define FFAppSetAssetsRoot      FAppSetAssetsRootW
#define FFAppGetAssetsRoot      FAppGetAssetsPathW
#define FFAppGetTemp            FAppGetTempW
#define FFAppSetTempRoot        FAppSetTempRootW
#define FFAppGetTempRoot        FAppGetTempRootW
#define FFAppGetCommand         FAppGetCommandW
#else
#define FFAppGetAssets          FAppGetAssetsA
#define FFAppSetAssetsRoot      FAppSetAssetsRootA
#define FFAppGetAssetsRoot      FAppGetAssetsRootA
#define FFAppGetTemp            FAppGetTempA
#define FFAppSetTempRoot        FAppSetTempRootA
#define FFAppGetTempRoot        FAppGetTempRootA
#define FFAppGetCommand         FAppGetCommandA
#endif


#if FUEL_OS_ANDROID



#endif
